Skip to content

Fix thread citations rendering as "Thread no longer available" - #61

Merged
ScriptedAlchemy merged 2 commits into
mainfrom
fix/thread-citation-unavailable
Nov 4, 2026
Merged

ScriptedAlchemy merged 2 commits into
mainfrom
fix/thread-citation-unavailable

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

Thread citations in chat could render as [Title](Thread no longer available) for threads that exist. Two compounding causes:

  • Angle-bracketed destinations ([label](<t3-thread://v2/...>), valid CommonMark and what agents emit) weren't parsed as labeled links in threadLinks. The inner <...> matched as an autolink, the label was discarded, and an unresolved title substituted Thread no longer available as the destination text — the literal broken markdown users saw. Resolved links would have produced nested [label]([Title](...)) instead.
  • Titles were resolved only from the shell snapshot, which omits idle subagent children (shellThreadFamilies) and all but the 25 newest settled threads (shellOlderSettled). A cited delegated-task child or settled thread therefore read as deleted on mobile (string relabel) and web (unresolved chip).

Fixes:

  • packages/shared/src/threadLinks.ts: labeled-link pattern accepts an optional <...> destination; same fix in mobile's threadChipTargets regex.
  • Mobile useLiveThreadLinkLabels and web MarkdownThreadLink now mount the cited thread's family read (the on-demand rows search and the Settled shelf already use) while the shell lacks it, so its title loads and the chip renders. "No longer available" now only shows after a settled read proves the thread is gone.

Test plan

  • New cases in packages/shared/src/threadLinks.test.ts (angle-bracketed labeled links: resolved, unresolved keeps label, refs listed) and apps/mobile/src/lib/enrichedLinkPresentation.test.ts (chip targets).
  • Verified the exact stored markdown from a reported screenshot against relabelThreadLinks: refs found, unresolved keeps written labels, resolved produces clean labeled links.
  • vp run check:changed passes (format, lint, knip, typecheck, tests).

Generated with Devin

ScriptedAlchemy and others added 2 commits November 3, 2026 23:25
Angle-bracketed link destinations ([label](<t3-thread://...>)) were not
parsed as labeled links: the inner <...> matched as an autolink, the
label was discarded, and an unresolved title substituted "Thread no
longer available" as the destination text.

Thread titles were also resolved only from the shell snapshot, which
omits idle subagent children and all but the 25 newest settled threads,
so live threads cited from chat read as deleted. Mobile and web now
mount the cited thread's family read (the on-demand rows search and the
Settled shelf already use) until its title lands.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Nov 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 31f7dd5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy

Copy link
Copy Markdown
Owner Author

Superseded by upstream PR pingdotgg#30709, rebuilt directly on upstream main (this fork's main has diverged too far for a clean upstream PR).

@ScriptedAlchemy
ScriptedAlchemy merged commit ea32593 into main Nov 4, 2026
20 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant